<?php
if(SAE_MYSQL_DB==='app_'){
	define("DB_SERVER", "127.0.0.1");
	define("DB_PORT", 3306);
	define("DB_USER", "root");
	define("DB_PWD", "");
	define("DB_NAME", "app_roughgame");
}
else{
	define("DB_SERVER", SAE_MYSQL_HOST_M);
	define("DB_PORT", SAE_MYSQL_PORT);
	define("DB_USER", SAE_MYSQL_USER);
	define("DB_PWD", SAE_MYSQL_PASS);
	define("DB_NAME", SAE_MYSQL_DB);
}

define("TB_GameSvr", "TB_GameSvr1");

$c = mysql_connect(DB_SERVER.':'.DB_PORT, DB_USER, DB_PWD);
if(!$c){
	die('database error 1');
}

if(!mysql_select_db(DB_NAME, $c)){
	die('database error 2'.DB_NAME);
}

if(!mysql_set_charset('utf8', $c)){
	die('database error 3');
}
